//举报方式 我的举报
var api = require('../util/api.js');
Page({
  data: {

  },

  onLoad: function (options) {
    let _this = this;
    _this.setData({
      showJbr: api.hasPerm('lhjd:wx:09:01')
    });
    let chain = api.chain();
    api.get(`${api.url.jbfs}/${chain.jbfsId}`).then(res => {
      if(api.hasPerm('lhjd:wx:09:01')){
        api.get(`${api.url.user}/${res.data.createBy}`).then(u=>{
          res.data.userName = u.data.userName;
          res.data.phonenumber = u.data.phonenumber;
          _this.setData({
            item: res.data,
            isEdit: true
          });
        });
      }else{
        _this.setData({
          item: res.data,
          isEdit: true
        });
      }
    })
  } 
})